const { contextBridge, ipcRenderer } = require('electron');

contextBridge.exposeInMainWorld('electronAPI', {
  executeProgram: (exePath, args) => ipcRenderer.invoke('execute-program', { exePath, args }),
  // 调试用：获取路径信息
  getPaths: () => ({
    appPath: ipcRenderer.sendSync('get-app-path'),
    resourcesPath: ipcRenderer.sendSync('get-resources-path')
  })
});
